|
Example: Communication ControllerLet us extend the communication controller from the previous chapter to count the incoming packages. For this purpose the controller instantiates a counter. The object diagram may look like this:
|
The aggregated counter can be one of the counters of the previous chapters. The method status returns the value of the counter whereas reset resets the counter. Behavior of the Communication ControllerThe default state of the communication controller is waiting. If for example a packet is received, the controller changes into the receive state. In this state it sends a count message to the counter. Then the controller returns into the waiting state. |